package org.ch02.sk.demo09;

import org.ch02.sk.demo08.Person;

import java.beans.MethodDescriptor;
import java.lang.reflect.Method;

/**
 * @author XCH
 * @date 2025 - 03 - 24
 */
public class MainTest {
    public static void main(String[] args) throws Exception {
        Method method = Person.class.getMethod("greet", String.class);
        MethodDescriptor md = new MethodDescriptor(method);
        Person person = new Person();
        md.getMethod().invoke(person, "你好");
    }
}
